package com.cjh.test.pojo;

import lombok.Data;
import org.springframework.util.StringUtils;

/**
 * @author ChenJunhong
 * @date 2018/12/07
 * Description:
 */
@Data
public class User {

    private String name;
    private String password;

    public static boolean check(User user){
        if(StringUtils.isEmpty(user.getName()) || StringUtils.isEmpty(user.getPassword())){
            return false;
        }
        if(user.getName().equals("cjh")){
            if(user.getPassword().equals("123456")){
                return true;
            }
        }
        return false;
    }
}
